package com.example.demo.controller;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Random;


@Controller
@RequestMapping("/random")
public class randomcontroller {
    @GetMapping
    @ResponseBody
    public String getRandomNumber() {
        Random random = new Random();
        int randomNumber = random.nextInt(1000);
        return String.valueOf(randomNumber);
    }
}